#! /usr/bin/env python
# -*- coding: utf-8 -*-

from Operation import OperationFactory
import logging

logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
                    datefmt='%a, %d %b %Y %H:%M:%S')


if __name__ == '__main__':
    factory = OperationFactory.OperationFactory()
    cal = factory.create_operation("+")
    cal.op1 = 23
    cal.op2 = 12
    logging.info(cal.get_result())

    cal = factory.create_operation("-")
    cal.op1 = 23
    cal.op2 = 12
    logging.info(cal.get_result())

    cal = factory.create_operation("*")
    cal.op1 = 23
    cal.op2 = 12
    logging.info(cal.get_result())

    cal = factory.create_operation("/")
    cal.op1 = 23
    cal.op2 = 12
    logging.info(cal.get_result())
